home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CD32 / CD32_Support / examples / cdgsxl / XLMSG / xlmsg.doc < prev    next >
Encoding:
Text File  |  1993-07-08  |  1.9 KB  |  55 lines

  1.                               xlmsg.doc
  2.                              W.D.L 930708
  3. -----------------------------------------------------------------------
  4.  
  5. xlmsg.c is source to a program which demonstrates how to communicate
  6. with cdgsxl through exec Messages and Message Ports.  To test xlmsg
  7. do the following from the CLI.
  8.  
  9.  
  10. > run cdgsxl xlfilename MSGPORTNAME xlport
  11. > xlmsg xlport
  12.  
  13. The MSGPORTNAME forces cdgsxl to create a MsgPort named 'xlport'. This
  14. port name is then passed into xlmsg (xlmsg xlport). xlmsg sends 2 messages
  15. to cdgsxl. A XLM_CMD_QUERY message and a XLM_CMD_ABORT message.
  16.  
  17. The message structure that cdgsxl uses for its MessagePort communication
  18. is as follows:
  19.  
  20. typedef struct XLMessage {
  21.     struct Message    msg;
  22.     ULONG        command;
  23.     ULONG        status;
  24.  
  25. } XLMESSAGE;
  26.  
  27. Where command can be one of XLM_CMD_QUERY or XLM_CMD_ABORT. XLM_CMD_QUERY
  28. just does a query on cdgsxl and returns status bits in the XLMESSAGE status
  29. member. XLM_CMD_ABORT causes cdgsxl to abort.
  30.  
  31. If cdgsxl is started with the MSGPORTNAME keyword, and it finishes playing a 
  32. CDXL sequence before it recieves a XLM_CMD_ABORT command, it will wait without 
  33. closing down its screen for either a XLM_CMD_QUERY command or a CTRL_C break.
  34.  
  35. If cdgsxl is started with the MSGPORTNAME keyword, and it recieves a XLM_CMD_ABORT
  36. command before it finishes playing a CDXL sequence, it will abort playback and
  37. close down everything, forgoing any waiting.
  38.  
  39. At any time you can query the state of cdgsxl by sending a XLM_CMD_QUERY
  40. command to cdgsxl.  cdsgxl will set bits in the status field which represent
  41. its state. Also if cdgsxl gets a XLM_CMD_ABORT command, it will set the status
  42. bits to let you know what was happening just prior to recieving the command.
  43.  
  44. Currently only the following status bits are supported:
  45.  
  46.  XLM_STATUS_PLAYING  // cdgsxl is playing a CDXL sequence
  47.  
  48.  XLM_STATUS_ABORTING // cdgsxl is in the process of aborting.
  49.  
  50.  
  51. See:
  52.  
  53.  xlmsg.c xlm.h cdgsxl.doc
  54.  
  55.